﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Redis读写分离.Common
{
    public class RedisMasterSlaveConfig
    {
        public RedisConfig MasterConnection { get; set; }
        public List<RedisConfig> SlaveConnections { get; set; }
    }

    public class RedisConfig
    {
        public SiteTypes SiteType { get; set; }
        public string Host { get; set; } = "127.0.0.1";
        public int Port { get; set; }  = 6379;
        public string Password { get; set; } = "123456";
        public int Db { get; set; } = 0;
    }

    public enum SiteTypes
    {
        MASTER,
        SLAVE
    }
}

